package testivrs.testivrs;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */



public class GetLoginDetails
{
    public boolean doPost(String name, String pass)
    {
       
        Database_access ob = null;
        int client=0;
       

        try {
            ob = new Database_access();

            
         
       

            client=ob.login(name, pass);

            if(client==1)
            {
                System.out.println("Student successfully logged in");
                return true;
            }
            else if(client ==2)
            {
                System.out.println("faculty successfully logged in");
                return true;
            }
                else
                {
                System.out.println("Invalid Username/Password");
                return false;
                }

       // pw.println(name+"     "+pass);

        } catch (Exception ex) {
            System.out.println(ex);
            return false;
        }




    }

  
}
